gdk: Drop settings events
authorMatthias Clasen <mclasen@redhat.com>
Mon, 30 Oct 2017 13:47:26 +0000 (09:47 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 30 Oct 2017 13:49:02 +0000 (09:49 -0400)
We are not emitting these events anymore, so lets remove them
from the api. The GdkSettingAction enum is moved to xsettings-client.c
where its only use remains.

gdk/gdkevents.c
gdk/gdkevents.h
gdk/gdkeventsprivate.h
gdk/x11/xsettings-client.c

index 63d17ea66689500a91318c3bfd91b3917e88c299..139ff481d1e76a61d55924b82d6e791bdcfa12d4 100644 (file)
@@ -694,10 +694,6 @@ gdk_event_copy (const GdkEvent *event)
         new_event->expose.region = cairo_region_copy (event->expose.region);
       break;
 
-    case GDK_SETTING:
-      new_event->setting.name = g_strdup (new_event->setting.name);
-      break;
-
     case GDK_BUTTON_PRESS:
     case GDK_BUTTON_RELEASE:
       if (event->button.axes)
@@ -814,10 +810,6 @@ gdk_event_free (GdkEvent *event)
       g_free (event->motion.axes);
       break;
       
-    case GDK_SETTING:
-      g_free (event->setting.name);
-      break;
-      
     case GDK_OWNER_CHANGE:
       if (event->owner_change.owner)
         g_object_unref (event->owner_change.owner);
@@ -936,7 +928,6 @@ gdk_event_get_time (const GdkEvent *event)
       case GDK_MAP:
       case GDK_UNMAP:
       case GDK_WINDOW_STATE:
-      case GDK_SETTING:
       case GDK_OWNER_CHANGE:
       case GDK_GRAB_BROKEN:
       case GDK_EVENT_LAST:
@@ -1023,7 +1014,6 @@ gdk_event_get_state (const GdkEvent        *event,
       case GDK_MAP:
       case GDK_UNMAP:
       case GDK_WINDOW_STATE:
-      case GDK_SETTING:
       case GDK_OWNER_CHANGE:
       case GDK_GRAB_BROKEN:
       case GDK_PAD_BUTTON_PRESS:
@@ -2524,26 +2514,6 @@ gdk_event_get_user_data (const GdkEvent *event)
   return private->user_data;
 }
 
-/**
- * gdk_event_get_setting:
- * @event: a #GdkEvent
- * @setting: (out) (transfer none):
- * 
- * Returns: %TRUE on success, otherwise %FALSE
- **/
-gboolean
-gdk_event_get_setting (const GdkEvent  *event,
-                       const char     **setting)
-{
-  if (event && event->type == GDK_SETTING)
-    {
-      *setting = event->setting.name;
-      return TRUE;
-    }
-
-  return FALSE;
-}
-
 gboolean
 gdk_event_is_sent (const GdkEvent *event)
 {
index 0450ca536d8e3331558b0565ccfcc18a5c62262c..8bc08a242c25970b9252b2b060859a1c90407b6f 100644 (file)
@@ -254,7 +254,6 @@ typedef GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent,
  * @GDK_SCROLL: the scroll wheel was turned
  * @GDK_WINDOW_STATE: the state of a window has changed. See #GdkWindowState
  *   for the possible window states
- * @GDK_SETTING: a setting has been modified.
  * @GDK_OWNER_CHANGE: the owner of a selection has changed. This event type
  *   was added in 2.6
  * @GDK_GRAB_BROKEN: a pointer or keyboard grab was broken. This event type
@@ -324,7 +323,6 @@ typedef enum
   GDK_VISIBILITY_NOTIFY = 29,
   GDK_SCROLL            = 31,
   GDK_WINDOW_STATE      = 32,
-  GDK_SETTING           = 33,
   GDK_OWNER_CHANGE      = 34,
   GDK_GRAB_BROKEN       = 35,
   GDK_DAMAGE            = 36,
@@ -535,22 +533,6 @@ typedef enum
   GDK_WINDOW_STATE_LEFT_RESIZABLE   = 1 << 16
 } GdkWindowState;
 
-/**
- * GdkSettingAction:
- * @GDK_SETTING_ACTION_NEW: a setting was added.
- * @GDK_SETTING_ACTION_CHANGED: a setting was changed.
- * @GDK_SETTING_ACTION_DELETED: a setting was deleted.
- *
- * Specifies the kind of modification applied to a setting in a
- * #GdkEventSetting.
- */
-typedef enum
-{
-  GDK_SETTING_ACTION_NEW,
-  GDK_SETTING_ACTION_CHANGED,
-  GDK_SETTING_ACTION_DELETED
-} GdkSettingAction;
-
 /**
  * GdkOwnerChange:
  * @GDK_OWNER_CHANGE_NEW_OWNER: some other app claimed the ownership
index fa98164d005ee605742d9aa8f0157216a781cf35..fb2c62a7475d86e80288df2a083648ca8bf84c09 100644 (file)
@@ -512,26 +512,6 @@ struct _GdkEventProximity
   GdkDevice *device;
 };
 
-/**
- * GdkEventSetting:
- * @type: the type of the event (%GDK_SETTING).
- * @window: the window which received the event.
- * @send_event: %TRUE if the event was sent explicitly.
- * @action: what happened to the setting (%GDK_SETTING_ACTION_NEW,
- *   %GDK_SETTING_ACTION_CHANGED or %GDK_SETTING_ACTION_DELETED).
- * @name: the name of the setting.
- *
- * Generated when a setting is modified.
- */
-struct _GdkEventSetting
-{
-  GdkEventType type;
-  GdkWindow *window;
-  gint8 send_event;
-  GdkSettingAction action;
-  char *name;
-};
-
 /**
  * GdkEventWindowState:
  * @type: the type of the event (%GDK_WINDOW_STATE).
@@ -788,7 +768,6 @@ struct _GdkEventPadGroupMode {
  * @proximity: a #GdkEventProximity
  * @dnd: a #GdkEventDND
  * @window_state: a #GdkEventWindowState
- * @setting: a #GdkEventSetting
  * @grab_broken: a #GdkEventGrabBroken
  * @touchpad_swipe: a #GdkEventTouchpadSwipe
  * @touchpad_pinch: a #GdkEventTouchpadPinch
@@ -847,7 +826,6 @@ union _GdkEvent
   GdkEventProximity        proximity;
   GdkEventDND               dnd;
   GdkEventWindowState       window_state;
-  GdkEventSetting           setting;
   GdkEventGrabBroken        grab_broken;
   GdkEventTouchpadSwipe     touchpad_swipe;
   GdkEventTouchpadPinch     touchpad_pinch;
index c52e8a0df7db484daf2672760ddfec8e6ba3096d..02a954fdc9e4d7c8ef281b065b8d957db1bff26e 100644 (file)
 #include <X11/Xlib.h>
 #include <X11/Xmd.h>           /* For CARD16 */
 
+typedef enum
+{
+  GDK_SETTING_ACTION_NEW,
+  GDK_SETTING_ACTION_CHANGED,
+  GDK_SETTING_ACTION_DELETED
+} GdkSettingAction;
+
 #include "gdksettings.c"
 
 /* Types of settings possible. Enum values correspond to